---
title: Offset/exposure with Gamma distributions
description: With monotonicity in DataRobot, to normalize or not to normalize, that is the question.
---

# Offset/exposure with Gamma distributions {: #offset-exposure-with-gamma-distributions }

<span style="color:red;font-size: 1rem"> `Robot 1`</span>

**How does DataRobot treat exposure and offset in model training with the target following a Gamma distribution?**

The target is total claim cost while `exposure = claim count`. So, in DataRobot, one can either set exposure equal to “claim count” _or_ set `offset = ln(“claim count”)`. Should I reasonably expect that both scenarios are mathematically equivalent?

Thanks!

<span style="color:red;font-size: 1rem"> `Robot 2`</span>

Yes, they are mathematically equivalent. You either multiply by the exposure or add the `ln(exposure)`.

<span style="color:red;font-size: 1rem"> `Robot 1`</span>

Thanks, that was my impression as well. However, I did an experiment, setting up projects using the two approaches with the same feature list. One project seems to overpredict the target, while the other underpredicts. If they are mathematically equal, what might have caused the discrepancy?

<span style="color:red;font-size: 1rem"> `Robot 2`</span>

Odd.  Are you using the same error metric in both cases?

<span style="color:red;font-size: 1rem"> `Robot 1`</span>

Yes, both projects used the recommended metric&mdash;Gamma Deviance.

<span style="color:red;font-size: 1rem"> `Robot 2`</span>

Can you manually compare predictions and actuals by downloading the validation or holdout set predictions?

<span style="color:red;font-size: 1rem"> `Robot 1`</span>

Upon further checking, I see I used the wrong feature name (for the exposure feature) in the project with the exposure setting. After fixing that, predictions from both projects match (by downloading from the Predict tab).

I did notice, however, that the Lift Charts are different.

<span style="color:red;font-size: 1rem"> `Robot 2`</span>

That is likely a difference in how we calculate offset vs. exposure for Lift. I would encourage making your own Lift Charts in a notebook. Then you could use any method you want for handling weights, offset, and exposure in the Lift Chart.

<span style="color:red;font-size: 1rem"> `Robot 3`</span>

We do have a great AI Accelerator for [customizing lift charts](custom-lift-chart).

<span style="color:red;font-size: 1rem"> `Robot 1`</span>

Amazing. Thank you!
